package subject_set.weekly_competition.day10_16;

import java.util.HashSet;
import java.util.Set;

/**
 * @author haomin
 * @date 2022/10/16 10:30
 **/
public class Num2 {
    class Solution {
        public int countDistinctIntegers(int[] nums) {
            Set<Integer> set = new HashSet<>();
            for(int i = 0; i < nums.length; ++i){
                set.add(nums[i]);
                String s = new StringBuffer(Integer.toString(nums[i])).reverse().toString();
                int num = Integer.parseInt(s);
                set.add(num);
            }
            return set.size();
        }
    }
}